package o;

import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;

public abstract class fgo<R extends ffc> {
    public fgr ˊ;
    public fgv ˎ;

    protected abstract void ˋ(R r);

    public final void ˊ(R r) {
        if (this.ˊ == null || !this.ˊ.ˋ()) {
            this.ˎ.ˏ(207135000);
            return;
        }
        int i = 0;
        if (!this.ˊ.ˏ()) {
            i = ॱ(r);
        }
        if (i <= 0) {
            ˋ(r);
        } else {
            this.ˎ.ˏ(i);
        }
    }

    protected int ॱ(R r) {
        return 0;
    }

    public R ˎ() {
        try {
            return (ffc) ˊ().newInstance();
        } catch (Exception e) {
            return null;
        }
    }

    private Class<R> ˊ() {
        Class cls = getClass();
        Type genericSuperclass = cls.getGenericSuperclass();
        while (!(genericSuperclass instanceof ParameterizedType)) {
            cls = cls.getSuperclass();
            genericSuperclass = cls.getGenericSuperclass();
        }
        return fip.ˎ(((ParameterizedType) genericSuperclass).getActualTypeArguments()[0]);
    }
}
